home *** CD-ROM | disk | FTP | other *** search
-
- FooBillard for Win32
- --==##############==--
- Copyright (C) 2001-2004 Florian Berger
-
- --
-
- Version 3.0 Win32 Release 1 port by:
- Kein-Hong Man (esq.) <mkh@pl.jaring.my>
-
- --
-
- PRELIMINARIES
-
- If uncompressed normally (with folders preserved), the game should be
- ready to run. Instructions can be found in the README file, and the
- manual pages, foobillard.6. Pool, billard or carambol rules can be
- found quite easily by Googling.
-
- FooBillard is licensed under GPL2, please see the README file for more
- information or the COPYING file for license information.
-
- ** This port should be not considered an exact port, because certain
- features had to be disabled, left out or were not implemented for Win32
- platforms. **
-
- --
-
- NOTES ON BEHAVIOUR
-
- For this Win32 port, FooBillard looks for data files in a subdirectory
- "data" relative to the location of the executable. User preferences are
- also saved in a configuration file, see below for more information.
-
- For a usage summary of command line options, please see the stderr.txt
- file in the executable's directory generated by SDL's redirection. The
- icons are unofficial, merely a minor cosmetic addition for this port.
-
- Display mode size and full screen toggle takes effect only when the
- game is terminated using the Quit menu option (or if the configuration
- is saved) and the game restarted.
-
- Network play is untested. See below for more information.
-
- --
-
- NOTES ON RENDERING
-
- If you find the frame rate when rendering reflections poor, switching
- off vertical sync might help a bit. Still, if you want the best visual
- quality, you will need a fast Nvidia graphics card with the appropriate
- capabilities. On a GeForce4 MX 440, rendering is much smoother with
- 16-bit colour (frame rate is much higher.)
-
- FooBillard will silently fail if your graphics card can't do some nifty
- visual effect. To check the capabilities of your card as detected by
- FooBillard, see the text output in the file stderr.txt. OpenGL extended
- features that are used by FooBillard is reported, and if one or more is
- missing, then some of the high-quality visual effects will not work. If
- your card has a different but equivalent feature set, sorry, but that's
- the way the code was written, I don't know enough to code advanced
- OpenGL stuff.
-
- --
-
- CONFIGURATION FILE
-
- The configuration file, .foobillardrc, is normally situated in the same
- directory where the executable lies, unless you are starting it with a
- shell that has a HOME environment variable installed. If HOME exists,
- then .foobillardrc is located in the HOME directory. .foobillardrc is
- read at the beginning, and is written to when the 'o' option is pressed,
- or when the user quits via the game menu. The configuration file will
- NOT be updated if the window's close button is pressed.
-
- --
-
- WHAT HAS BEEN FIXED IN FooBillard-3.0-Win32-1
-
- * For changes from 2.9 to 3.0 for the canonical sources, please see the
- file ChangeLog. The following are Win32-specific changes:
- * Multitextures (cloth effect) should work on cards with OpenGL drivers
- that support it. This is ARB defined, so it isn't Nvidia-specific.
- * Rendered+Fresnel reflections works on Nvidia cards that can handle
- the vertex programs ("GL_NV_vertex_program" feature).
- * Bump reflections should work on suitable Nvidia cards, but I have not
- tested it (my generic card does not appear to handle texture shaders,
- I am not a power user/gamer). If bump mapping works for your setup,
- please drop me a line if you want.
-
- WHAT HAS BEEN FIXED IN FooBillard-2.9-Win32-2
-
- * Changing resolution takes effect the next time you run the game.
- * Full/windowed screen switching also works in the same way.
- * This port handles command line options. These options are remembered
- if you quit the program using the main menu.
- * This port saves and restores user preferences.
-
- WHAT STILL DOESN'T WORK OR DOESN'T WORK THAT WELL
-
- * Network play is completely untested. See below for explanation.
- * When you use Alt-Tab to switch apps when in full screen mode, OpenGL
- seems to write over the Alt-Tab popup icon window. This is a Win32
- glitch on Win98, and I don't suppose it can be fixed.
- * When you use Alt-Tab to switch apps in any mode, your cue ball can
- change. This is obviously incorrect behaviour; I have not tracked down
- the problem.
- * The port seems quite stable, but it is NOT rock-solid.
- * Most font sizes does not change with resolution changes, so for lower
- resolutions, some text might be drawn beyond the visible area. This
- is normal behaviour for the Linux version. FooBillard is best run
- at 800x600 or better.
-
- --
-
- LIBRARIES
-
- This binary distribution contains the following libraries, many thanks to
- the GnuWin32 project (http://gnuwin32.sourceforge.net/). Using precompiled
- DLLs and libraries saved a lot of time and effort, and for that I am
- extremely grateful.
-
- (a) FreeType 2. Freetype 2 is licensed under GPL2 (see the file COPYING).
- (GnuWin32 freetype-2.1.5-bin.zip) The FreeType Web site is at
- http://www.freetype.org/
- (b) libpng 1.2.5. (GnuWin32 libpng-1.2.5-1-bin.zip) The libpng Web site is
- at http://www.libpng.org/
- (c) zlib 1.2.1. (GnuWin32 zlib-1.2.1-1-bin.zip)
- The zlib Web site is at http://www.zlib.org/
- (d) SDL 1.2.7. Licensed under LGPL. Please see README_SDL.txt.
- The SDL Web site is at http://www.libsdl.org/
- (e) libgw32c-0.4. (GnuWin32 libgw32c-0.4-lib.zip)
- An additional C function library, for the getopt functions.
-
- Since FooBillard is GPL software, static linking does not affect the
- licensing of the software, and is legal. Static linking saves about 100K.
- Static linking used to introduce an audio glitch on my machine, a kind of
- scratchiness in the sound output. [Update 20040201] The audio glitch is
- caused by linking libgw32c before libmsvcrt. Adding -lmsvcrt before
- -lgw32c solves the problem.
-
- SDL is still linked as a DLL and SDL.dll should always exist somewhere
- in the executable path when you attempt to run FooBillard.exe.
-
- --
-
- COMPILING
-
- This port was compiled on MinGW 3.1.0-1 and MSYS 1.0.9. You will need the
- development libraries and DLL binaries for:
- (a) SDL 1.2.7
- (b) freetype-2.1.5 (bin, lib)
- (c) libpng-1.2.5 (bin, lib)
- (d) zlib-1.2.1 (bin, lib)
-
- For FooBillard 3.0, the SDL version is 1.2.7 (it was previously 1.2.5).
- Make sure the scripts sdl-config and freetype-config works by testing them
- on the command line first. Successfully building the SDL test programs is a
- good indication that your setup is good. The libpng and zlib include files
- and library files should be within reach of gcc with your setup.
-
- Makefile.mingw contains quite a number of fixes; the Makefile generated by
- the configure script will probably fail without fixes. The critical fixes
- are the library names to link. First generate a fresh Makefile to build the
- usual files that the configure script writes. This also builds dependency
- information in the .deps directory, which is required for the build process.
- Run the following in the source root directory:
-
- ./configure --enable-SDL
-
- You will need to edit the tweaked Makefile, Makefile.mingw, in order to
- compile Foobillard. The things that need changing are all the user-
- specific absolute path references. Makefile.mingw has been simplified so
- that the changes are most likely the ones specified at the beginning of the
- script. If you want to modify Makefile.mingw, using WinMerge with a copy of
- a fresh Makefile might help, for comparison purposes.
-
- To compile, run the following in the foobillard src/ directory:
-
- touch Makefile.mingw
- make -f Makefile.mingw
-
- Makefile.mingw needs to be more recent than config.status, hence the touch
- command, otherwise it balks and tries to rebuild itself, which would fail.
- 'm' is a shell script to save typing.
-
- I have not tried compiling without SDL, because SDL is needed for sound,
- anyway. FooBillard can be built with Glut on Linux, but I have not reviewed
- the relevant source code for Glut when doing this port, so try it at your
- own risk.
-
- Creating a completely Win32-specific version of FooBillard with perhaps,
- Direct3D is a non-trivial task, and I have no plans to do that. I plan to
- stick to the Linux code base as far as possible. It's better not to have a
- native Direct3D port, because unless there is a developer willing to
- maintain it on a long-term basis, the code will suffer from bit rot.
-
- The distributed executable has been stripped in order to save download time.
- If you want to do development work on Foobillard on the Win32 platform,
- you'll have to roll your own executable.
-
- --
-
- NETWORKING PROBLEM
-
- Currently, network play does not work because the network code has not
- been tested at all. It just links without errors. The option "hostaddr" is
- used as the host name for your machine from which FooBillard will call
- gethostbyaddr().
-
- Although the net_socket.c compiles and links, its functionality has not
- been tested. There is no added code for Win32-specific sockets stuff, so
- if there is supposed to be some kind of initialization procedure, it is
- probable that the executable will not work.
-
- I am not on a network where I can test FooBillard's multiplayer mode.
- Hopefully, this will be sorted out in a future release. If you are willing
- to debug this feature for Win32 machines, by all means. I'll gratefully
- accept a patch.
-
- --
-
- RESOLUTION/FULLSCREEN SWITCHING PROBLEM
-
- On Win32, SDL+OpenGL need to be reinitialized when the screen mode is
- changed, whether resolution or fullscreen to windowed and vice versa.
- Doing the reinitialization in-game is not trivial, and I've spent
- quite a few hours attempting it without success. In the end, I think
- it's much easier to make the user restart the program in order to
- make the new settings take effect.
-
- --
-
- WHAT CHANGED FROM THE CANONICAL 3.0 SOURCES
-
- This is a non-exhaustive list, but I think these are the major changes.
- Those marked with a * are different from the version 2.9 list.
-
- Makefile.mingw
- tweaked Makefile output from configure script
- netsocket.c
- added Win32 winsock2.h include file handling
- fixed time_us() function with SDL call
- fixed constant define ECONNREFUSED
- (untested, done in order to compile successfully only)
- png_loader.c
- permanently enabled png compression option
- ball.c
- included glext.h for Win32 only
- fixed OpenGL extension handling to be enabled using flag*
- table.c
- included glext.h for Win32 only
- fixed OpenGL extension handling to be enabled using flag*
- options.h
- disabled options_3D_winnertext, crashes in Win32?
- added externs for OpenGL extended functions*
- options.c
- added pointers for OpenGL extended functions*
- bumpref.c
- fixed OpenGL extension handling to be enabled using flag*
- foobillard.rc
- new Win32 resource file (icon, basic app info)
- foobillard.ico
- new Win32 icon file (16x16x8, 32x32x4|8, 64x64x8 formats)
- helpscreen.c
- added constants for defining help text sizes
- sys_stuff.c
- added a call to set window and icon titles
- largely disabled SDL video resizing function
- fixed inclusion of SDL headers to use sdl-config method*
- billard3d.c
- added handling for endianness (missing header file)
- included glext.h for Win32 only
- included libgw32c getopt header file
- added convenient path functions (config file, data dir)
- enabled option and config file handling for Win32
- fixed time_us() function with SDL call
- added code to remember resolution change
- added function address loaders for OpenGL extensions*
-
- --
-
- Finally, my hats off to Florian Berger for this work of art. :)
-
- --
-
- Enjoy!!
-
- Kein-Hong Man (esq.)
- Kuala Lumpur
- Malaysia 20040422
-